/**
 * 
 */
package cosc617_blackteam;

import java.util.Iterator;

/**
 * @author Laura
 *
 */
public class PrepByPartySize implements I_CookingStrategy {
	private OrderCollections orderList;
	
	public PrepByPartySize(OrderCollections orders){
		orderList = orders;
	}
	
	@Override
	public void prepareFood() {
		Iterator<Order> iterator = orderList.unmadeByPartySizeIterator();
		if (iterator.hasNext()){
			Order order = iterator.next();
			order.decrementCookTime();
		}

	}

}
